﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Addon;

namespace Plugin
{
    public partial class InfoForm : Form
    {
        public DForm f = new DForm();
        public InfoForm()
        {
            InitializeComponent();
        }

        #region Info Funtions
        public void setMap(string mapname)
        { this.Info_Map.Text = "Map: " + mapname; }
        public void setPlayer(int nr)
        { this.Info_Player.Text = "Player: " + nr; }
        #endregion

        private void btn_reset_Click(object sender, EventArgs e)
        {
            
            f.reset();
        }

        #region Options
        public bool options_prntplayerlocinconsole()
        {   return checkBox_printplaylocinconsole.Checked;  }

        public bool options_prntplayerloc()
        { return checkBox_drawplayloc.Checked; }
        
        public bool options_autosave()
        { return checkBox_autosave.Checked; }
        #endregion 

        #region combobox
        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (comboBox1.Text != "")
            {
                label_player_clientid.Enabled = false;
                label_player_draw_color.Enabled = false;
                label_player_ip.Enabled = false;
                label_player_name.Enabled = false;
                label_player_team.Enabled = false;
                label_player_xuid.Enabled = false;
            }
            else {
                label_player_clientid.Enabled = true; 
                label_player_draw_color.Enabled = true;
                label_player_ip.Enabled = true;
                label_player_name.Enabled = true;
                label_player_team.Enabled = true;
                label_player_xuid.Enabled = true;
                }
        }
        public void addToCombobox(ServerClient Client)
        {
            comboBox1.Controls.Add(new Control(Client.ClientNum.ToString()));
        }
        public void RemoveFromComboBox(ServerClient Client)
        { comboBox1.Controls.Remove(new Control(Client.ClientNum.ToString())); }
        #endregion 
    }
}
